package gmusic.command;

import gmusic.bo.ArtistBean;
import gmusic.services.impl.GMusicServicesImpl;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

public class AfficherArtistsGM implements Command {

	// private final static Logger log =
	// Logger.getLogger(AfficherArtistsGM.class);

	public String execute(HttpServletRequest req) throws Exception {

		HttpSession session = req.getSession();
		List<ArtistBean> artists = GMusicServicesImpl.getInstance()
				.getAllArtists();
		List<String> premieresLettre = GMusicServicesImpl.getInstance()
				.getPremieresLettreArtistes();
		session.setAttribute("artists", artists);
		session.setAttribute("premieresLettre", premieresLettre);

		return "/afficherArtistsGM.jsp";
	}
}
